Skip to content

Plasma and frontier laser guns - #540

Merged
Jackriip merged 132 commits into
masterfrom
feature/plasma-weapons
Nov 16, 2026
Merged

Jackriip merged 132 commits into
masterfrom
feature/plasma-weapons

Conversation

@Jackriip

@Jackriip Jackriip commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Adds two plasma guns, two frontier laser guns, single-use plasma cartridges and plasma burn wounds.

Guns

Gun Fires Where it comes from
Kestrel laser pistol 20-damage laser, 20 shots per cell Outfitter, 900 cr; green loot
Hornet laser SMG full-auto 10-damage beams that scatter wide, 40 shots per cell Black market, 3,500 cr; yellow loot
Cinder plasma pistol 22-burn plasma bolt, 15 shots per cartridge Outfitter at yellow rep, 2,000 cr; yellow loot
Furnace plasma rifle 30-burn armour-piercing plasma bolt, two-handed, 12 shots per cartridge Black market, 5,000 cr plus a voucher; red loot
Old Furnace Furnace that shoots dead straight Rare red-zone plunder, and a rare drop from two red-zone pirate bosses

How plasma works

  • Bolts:
    • fly at 10 tiles/s, slow enough to dodge at range
    • can't be reflected
    • are stopped by glass and grilles, which they damage
    • ignore canisters
  • Burns, not fire: a hit never sets anyone alight. Bolts carry a high wound bonus (pistol 10, rifle 20), so repeat hits on one limb reach severe and critical burns. A bolt still ignites plasma or other fuel gas it passes through or hits.
  • Plasma burns: bolts cause their own burn wounds, a subtype of tg's flesh burns, so every normal burn treatment still works.
    • Slag Spatter Burns, Embedded Slag Burns and Plasma Burn-Through leave molten slag in the wound. Hot slag keeps burning the limb until it's cooled, and the burn can't close while slag is in. Cryo doesn't clear it. A burn-through limps or fumbles.
    • Care is cool, cut, cover: cool the slag with water, an extinguisher or a shower; pick it out with a hemostat (wirecutters or a scalpel in a pinch, slower and rougher) or excise it in surgery ("Excise plasma slag"); then treat and dress the burn as usual. Moderate flecks fall off by themselves once cool. Severe and critical slag comes out as a slag bead.
    • Healed plasma burns leave their own scars.
    • The wound shows on the limb: glowing purple slag while hot, black crust once set, raw skin once it's out. Clothing covers it.
  • Limb loss: an arm or leg melts through tg's burn dismemberment (no blood spray, no flying limb) when enough of the bolt gets through armour, the limb was already hurt before the bolt, and it is left close to its damage cap; or, for the rifle, when it already carries a Plasma Burn-Through with slag still in it. No bolt melts a healthy limb in one hit. Heads and chests never melt. A robot limb, or one with no flesh (skeletons, golems, plasmamen), comes off dry: sparks, a slag pool and a hiss, with no drips, no gobbets and no stump.
  • Structures: bolts break every structure and door the same way, however armoured, and faster than other guns: one bolt breaks through a grille, a shuttle window takes 3 rifle or 5 pistol bolts, an airlock 5 rifle bolts and a blast door 10. Indestructible things, and the walls, doors and gates of trader outposts and the Colosseum, hold as usual. Mechs, turrets and other machines take normal damage, and walls take none.
  • Ammo:
    • Guns run on plasma cartridges. A cartridge is single-use: it comes full and is never refilled.
    • Print one at a lathe once Ballistic Ammunition is researched (3 sheets of plasma and half a sheet of iron), or buy one at the outfitter for 100 cr at yellow rep. They can't be hand-crafted.
    • Loading a cartridge swaps out the one in the gun: a part-used cartridge comes back to your hand with what's left in it, a spent one drops at your feet. Alt-click takes the cartridge out. A spent cartridge can't be loaded, and it recycles to iron only.
    • The gun's coils glow brighter the more plasma is left, and dim step by step as it runs out.
    • Guns bought from a shop come with a full cartridge. Guns found as loot have a part-used one: at least one shot, at most half full, in whole shots.
    • The gun's chamber can't be charged by anything except a cartridge: rechargers, inducers, APCs, cell-charging slimes and plants are all refused.
  • Turrets: plasma guns can't be put in turrets or emitters.
  • NPCs: no NPC carries a plasma gun for now (PLASMA_NPC_GUNS is 0). The human-NPC pirate loadouts for them are in the code, switched off.

Effects

  • Hits on people: a hit bursts into molten hot-purple slag. Ordinary hits alternate between a molten splatter and a flash with a spreading ring. A hit that kills or leaves a critical burn plays a burn-through instead, spraying out the far side of the body. Globs stick to the body, move and turn with it, and cool away in about 2.5 s.
  • Melting limbs: a melted arm or leg heats up, sags and runs off in drips into a growing pool, then the stump bubbles and cools to a seared stump. Each pool sets into its own slag puddle that stays until it's cleaned (up to 3 per tile, 150 in the world). Mops, soap, space cleaner and cleanbots clean it up. The jumpsuit sleeve burns away at a melted arm. Held items and shoes melt with the limb, then fall to the floor beside the feet. If the victim moves mid-melt, the limb goes with them and later drips land under them.
  • Shields: a held shield blocks bolts at its normal chance and takes the damage. The bolt bursts on the shield's own pixels, coats it and drips off as slag, with the shield's own block sound.
  • Barrel pinch: each shot swells a ball of plasma at the barrel with a flash on the hands and a small purple light, snaps it small as the bolt leaves, and opens a ring where the ball was.
  • Bolts are purple teardrops of liquid fire and carry a moving purple light.
  • Impacts look different on walls, glass and armour. Hit spots on walls and floors glow purple, cool to char and leave soot that stays until it's cleaned.
  • A bolt that misses fizzles out at the end of its range.
  • Lasers: a hitscan beam aimed at a lying body now ends on the body, not the floor beside it.
  • Sounds: each gun has its own fire sound, plus a distant version for listeners 18-40 tiles away. Plasma hits on people, burn-throughs and limb melts have their own new sounds. Wall and glass hits, near misses, robot-limb melts, cooling slag and picking it out use existing tg sounds; a shield block plays the shield's own.

Fixes in this PR

  • White limb after losing two limbs: with hyperviolence, a body that lost two or more limbs drew every lost limb's sleeve mask after the first as a white limb shape. Each lost limb now gets its own hidden mask.
  • Progress cogs: a do_after cog removes only itself, so one finishing no longer clears another on the same mob.

Media

Recorded in a real client at real speed.

Bolts and the barrel pinch (Furnace, then Cinder, in all four facings):
bolts
barrel pinch

Wall and glass hits in the dark:
wall and glass

Hits on people (two ordinary hits, then two burn-throughs):
bursts

Plasma burns (a pistol hit, then rifle hits on the same chest; the slag picked out with a hemostat):
slag burn
slag pick

Melting limbs (arm with gloves and a held crowbar, leg, lying, walking off mid-melt, a robot arm):
melt arm
melt leg
melt lying
melt walk
melt robot arm

Shield block:
shield

Cartridge in hand (full, then spent):
cartridge in hand

Assets

The gun and cartridge sprites (recoloured to hot purple) and the plasma, RCW and laser pistol sounds are from Mojave Sun (CC BY-NC-SA 3.0). The bolt, effect, burst, melt and plasma wound sprites, the coil glow states, and the plasma hit, burn-through and melt sounds, are new. Each file's source and licence is listed in voidcrew/modules/plasma_weapons/icons/attributions.txt and sound/attributions.txt. There's a new player wiki page at wiki/content/plasma-and-laser-guns.md.

…types, red-zone Old Furnace roll, laser empty sprites
… body

The splash states are six 0.1 s frames, but the splash lived 0.5 s, so the
last frame (the cooling pane glow on glass, the last droplets on walls) never
showed. Splashes now live 0.6 s.

The flesh splash's steam came from the shared steam pool, whose holder draws
above every mob. A bolt hitting the far side of a body put its steam over the
chest while the splash itself was hidden. The steam now uses its own pool whose
holders take the splash's layer.
tg's range-out hop leaves a projectile a tile less twice its overshoot short
of where it ran out, so the gutter-out appeared up to a tile behind the bolt's
last drawn spot. The gutter now adds that shortfall back along the bolt's path.

The wisp named a state the copied projectile icon does not have, so it never
drew, and the switch to it flashed the bolt's emissive core upright for a
frame. The core, light, icon and transform now change together in one update,
the wisp uses the effects icon, and it fades in its own frames instead of
being faded a second time.
Hits no longer add fire stacks. Bolts carry higher wound bonuses so they
leave real burn wounds, melt a hurt arm or leg (the rifle also one with a
critical burn, never a healthy limb in one hit), and break structures and
doors faster. The pistol bolt goes from 30 to 32 damage to keep its time to
kill without the fire.
The limb comes off at once through tg's burn loss; a copy of the limb as it was
drawn glows, sags, drops its lower half and goes, then tg's ash shows under it.
Blocking poses only.
Ordinary hits alternate between a molten splatter and a flash with a ring.
A hit that kills or gives the limb a critical burn burns through instead,
with an exit spray out the far side and a cooling entry wound. Globs that
stick to the body move and fall with it. Rifle and pistol bursts are drawn
separately, the pistol at 0.6x. A held shield that blocks a bolt throws the
metal splash on the shooter's side.
The copy flew a fixed path on the client's clock and was swapped for the
bolt by a server timer. When the server ran slow the copy got up to a
tile and a half ahead, so on short shots it sat on the target and the
bolt then showed further back and flew in again. The copy now repeats
each movement step the bolt makes, with the same timing, closing
sideways onto the bolt's line over the first tile, and hands over once
the bolt has covered that tile.
A finished cog fades for half a second, then its Destroy() removed every
managed vis overlay on the user, including the cog of a do_after that had
started in the meantime. Picking plasma slag one bead after another showed
no cog for the second pick, so the slag seemed to come out seconds after
the work ended.
Furnace bolt 30 burn, armour piercing 15; Cinder bolt 22 burn. The Hornet sprays its own 10-burn beam every
0.15 s with spread 20 and 40 shots a cell. The Furnace now cools about 3 heat a second in room air and 1 in
vacuum, so a cartridge overheats it; glow steps move to 30/55/80, the first two read brighter, the coil ticks
at the last one, and a boil sheds more heat. Tests, ratings and the wiki follow.
tg ends a hitscan tracer at the clicked pixel as if the body stood upright, or half a tile past where the beam
entered the tile. A body lying down is drawn on its side in the low half of its tile, so automatic lasers like
the Hornet drew every beam ending on the floor next to it. Only the tracer's end moves; hits are unchanged.
The Furnace now cools faster between shots: a careful pace never overheats a
cartridge, flat out overheats around the 8th shot. An overheat locks the gun
for ten seconds instead of boiling plasma and damaging it. The V key starts a
vent with a sweeping bar; gold clears the heat and halves it for a few shots,
amber vents most of it, letting it run out vents it a moment slower, and the
dark ends spit plasma like the old vent. Furnace pirates run the same heat and
let their vents run out.
The bar is now 21 px wide and 5 px tall (one pixel per unit), with a 3 px
marker, down from about 78 px. The marker reach and the strip offset are
redrawn to match, so it stays centred over the body and over the zone the
tap is judged in.
PLASMA_NPC_GUNS (0) turns off the yellow- and red-zone pirate Cinder and
Furnace loadouts and the red-zone Director Prime and Chief Auditor Furnace.
Bosses keep their stock weapon, and the Old Furnace stays in red-zone boss
loot. The code stays for when the define goes back to 1, and the pirate tests
check whichever way it is set. The wiki no longer says pirates fire them.
Every melted limb now leaves its own slag where its pool lay, up to three on
a tile; a fourth replaces the tile's oldest. Before, a second melt on a tile
found the first slag and its pool simply vanished. The slag no longer merges
like other floor messes, cleanbots now go after it, and the cooling pool's
glow fades out with its light so the slag takes over without a jump in the
dark.
@Jackriip
Jackriip marked this pull request as ready for review November 16, 2026 18:08
With two or more limbs lost, the sleeve masks after the first rode on the first mask as plain overlays. Those are not part of its render target, so they were drawn on the body as white limbs. Each lost limb now gets its own mask appearance, render target and filter.
An overheat in a player's hand brings the vent bar up at once: gold ends the
lockout with the coils cold, amber vents most of the heat and cuts the lockout
to 2 s, a miss or a fumble leaves the whole lockout (the fumble spits gas).
The bar is now 38 px inside (fail 12, amber 5, gold 4, amber 5, fail 12) and
the marker crosses it in 1 s.
The Cinder, Furnace and Old Furnace are plain plasma guns again: no barrel
heat, cooling, overheat lockout, vent bar, vent keybinding or vented gas, and
no "too hot" reload refusal. Pirate plasma gunners lose their heat and vent
handling and only fire and change cartridges.

The coil glow states now show how much plasma is left: brightest on a full
cartridge, dimmer as it runs down, dark when empty or unloaded, on the world
and in-hand sprites.

The Furnace is back to 12 shots a cartridge. The Old Furnace keeps its
spread of 0.
@Jackriip
Jackriip merged commit 15cdbef into master Nov 16, 2026
3 of 4 checks passed
@Jackriip
Jackriip deleted the feature/plasma-weapons branch November 16, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant